package networking.messages;

import interfaces.hud.chat.ChatType;
import logic.common.team.Fraction;

public class ChatMessage extends SimpleMessage {
	
	private String chatText;
	private ChatType type;
	private Fraction fraction;
	private int squadIndex;
	
	public ChatMessage() {
		super();
	}
	
	public ChatMessage(String chatText, ChatType type, Fraction fraction, int squadIndex) {
		this();
		this.chatText = chatText;
		this.type = type;
		this.fraction = fraction;
		this.squadIndex = squadIndex;
	}
	
	public ChatMessage(String chatText, ChatType type, Fraction fraction) {
		this(chatText, type, fraction, -1);
		assert(type == ChatType.TeamChat);
	}
	
	public ChatMessage(String chatText, ChatType type) {
		this(chatText, type, null, -1);
		assert(type == ChatType.Chat);
	}
	
	public String getChatText() { return chatText; }
	
	public ChatType getType() { return type; }
	
	public Fraction getFraction() { return fraction; }
	
	public int getSquadIndex() { return squadIndex; }
}